home *** CD-ROM | disk | FTP | other *** search
- on showperc p
- member("slott").image = member("percslot").image.duplicate()
- m = member("slott").image
- omtrek = 224
- perc = omtrek * p
- q = 1
- if perc >= 64 then
- q = 2
- end if
- if perc >= 112 then
- q = 3
- end if
- if perc >= 176 then
- q = 4
- end if
- put perc - 64 - 48
- put q
- case q of
- 1:
- m.draw(0, 0, perc, 0, [#lineSize: 2, #color: rgb(0, 0, 0)])
- 2:
- m.draw(0, 0, 64, 0, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(62, 0, 62, perc - 63, [#lineSize: 2, #color: rgb(0, 0, 0)])
- 3:
- m.draw(0, 0, 64, 0, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(62, 0, 62, 48, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(64, 46, 64 - (perc - (48 + 64)), 46, [#lineSize: 2, #color: rgb(0, 0, 0)])
- 4:
- m.draw(0, 0, 64, 0, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(62, 0, 62, 48, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(64, 46, 0, 46, [#lineSize: 2, #color: rgb(0, 0, 0)])
- m.draw(0, 48, 0, 47 - (perc - (48 + 64 + 64)), [#lineSize: 2, #color: rgb(0, 0, 0)])
- end case
- end
-